export interface IChildRoute{
    path:string,
    name:string,
    component:string
}
export interface IBestAFSRoute {
    path: string
    routes?: Array<IChildRoute>
    component?: string
    name?: string // 兼容此写法
    icon?: string
    // 更多功能查看
    // https://beta-pro.ant.design/docs/advanced-menu
    // ---
    // 新页面打开
    target?: string
    // 不展示顶栏
    headerRender?: boolean
    // 不展示页脚
    footerRender?: boolean
    // 不展示菜单
    menuRender?: boolean
    // 不展示菜单顶栏
    menuHeaderRender?: boolean
    // 权限配置，需要与 plugin-access 插件配合使用
    access?: string
    // 隐藏子菜单
    hideChildrenInMenu?: boolean
    // 隐藏自己和子菜单
    hideInMenu?: boolean
    // 在面包屑中隐藏
    hideInBreadcrumb?: boolean
    // 子项往上提，仍旧展示,
    flatMenu?: boolean
}
const routes: IBestAFSRoute[] = [
    {
        path: '/',
        component: '@/pages/index'
    },
    {
        path: '/home',
        icon: 'HomeOutlined',
        name: '首页',//如果需要出现在左侧的菜单栏只需添加name属性
        component: '@/pages/home'
    },
    {
        path: '/login',
        // name:'登录',
        component: '@/pages/login',
        headerRender: false,
        // 不展示页脚
        footerRender:false,
        // 不展示菜单
        menuRender: false
    },
    {
        path:'/banner',
        name:'轮播图的管理',
        icon:'FileImageOutlined',
        routes:[
            {
            path:'/banner/list',
            name:'轮播图列表',
            component:'@/pages/banner/list'
            }
        ]
    },
    {
        path:'/pro',
        name:'商品管理',
        icon:'ShoppingOutlined',
        routes:[
            {
            path:'/pro/list',
            name:'商品列表',
            component:'@/pages/pro/list'
            },
            {
            path:'/pro/recommend',
            name:'商品推荐',
            component:'@/pages/pro/recommend'
            },
            {
            path:'/pro/seckill',
            name:'商品秒杀',
            component:'@/pages/pro/seckill'
            }
        ]
    }

]
export default routes